From: Olivier Fourdan Date: Wed, 19 Jan 2022 09:18:06 +0000 (+0100) Subject: shell: Restore NOFILE limit before restarting X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~530^2^2~105 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1bb05c33be24a4d04ae564b8f6566ffebeb43ec4;p=gnome-shell.git shell: Restore NOFILE limit before restarting When restarting Shell, make sure to restore the original nofile limit so that the new instance starts with the original value. Part-of: --- diff --git a/src/shell-global.c b/src/shell-global.c index a603ab384..ac8edb1e5 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -1166,6 +1166,7 @@ shell_global_reexec_self (ShellGlobal *global) { GPtrArray *arr; gsize len; + MetaContext *meta_context; #if defined __linux__ || defined __sun char *buf; @@ -1242,6 +1243,9 @@ shell_global_reexec_self (ShellGlobal *global) */ pre_exec_close_fds (); + g_object_get (global, "context", &meta_context, NULL); + meta_context_restore_rlimit_nofile (meta_context, NULL); + meta_display_close (shell_global_get_display (global), shell_global_get_current_time (global));